import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {

        Scanner scan = new Scanner(System.in);
        int size = scan.nextInt() ;
        int k = scan.nextInt() ;
        int sum = 0 ;
        int[] array = new int[size] ;
        int len = 0 ;
        for (int i = 0; i < size; i++) {
            int tmp = scan.nextInt() ;
            if(tmp %2 != 0){
                sum += tmp ;
            }else{
                array[len++] = tmp ;
            }
        }
        int len2 = len ;
        createHeap(array , len);
        for(int i = 0 ; i < k ; i ++){
            if(array[0] %2 == 0){
                array[0] = array[0] / 2 ;
                shiftDown(array , 0 , len);
            }else{
                swap(array , 0 , len-1);
                len -- ;
                shiftDown(array , (len-1-1)/2 , len);
                i -- ;
            }
        }
        for(int i = 0 ; i < len2 ; i ++){
            sum +=  array[i];
        }
        System.out.println(sum );

    }
    private static void createHeap(int[] array , int len){
        int parent = (len-1-1) /2 ;
        while(parent >= 0 ){
            shiftDown(array , parent , len);
            parent -- ;
        }
    }
    private static void shiftDown(int[] array , int parent , int len){
        int child = parent*2 + 1;
        while(child < len){
            if(child+1 < len && array[child] < array[child+1]){
                child ++ ;
            }
            if(array[parent] < array[child]){
                swap(array, parent , child);
            }
            parent = child ;
            child = parent*2 + 1;
        }

    }
    private static void swap(int[] array , int i , int y){
        int tmp = array[i];
        array[i] = array[y];
        array[y] = tmp ;
    }

}
